<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        
    </style>
</head>
<body>
    <script>
        function mymap (f,a) {
        	var resultArr = [],
        	i;
        	for(i=0,len=a.length;i<len;i++){
        		resultArr[i] = f(a[i]);

        	}
        	return resultArr;
        }
        var a = mymap(function(v){return v*v*v},[0,1,2,3,5]);
    </script>
</body>
</html>